It's easy to forget to add a new <release> tag to the metainfo when
doing a new release.
Address this with an additional test if appstream-util is recent
enough to include the new validate-version command, so distcheck
fails when the metainfo wasn't updated.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1117
args: ['validate', '--nonet', metainfo],
workdir: meson.current_build_dir()
)
+
+ r = run_command(appstream_util, '--help')
+ if (r.stdout().contains('validate-version'))
+ test('Checking release entry for @0@'.format(meson.project_version()),
+ appstream_util,
+ args: ['validate-version', metainfo, meson.project_version()],
+ workdir: meson.current_build_dir()
+ )
+ endif
endif